package com.iot08.common.entity.app;

import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;
import org.springframework.data.mongodb.core.mapping.Field;

import java.io.Serializable;
import java.util.Date;

/**
 * 用户针对绑定设备的申请记录表
 * @author weichao 1299101858@qq.com
 * @version 1.0
 * @date 2/26/22 3:43 PM
 */
@Data
@Document("device_attention")
public class DeviceAttention implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    private String id;

    @Field("i")
    private String imei;

    private String name;
    /**
     * 申请者的openid
     */
    private String apply_openid;

    /**
     * 被申请者的openid (管理员)
     */
    private String openid;

    /**
     * 记录的类型
     */
    @Field("T")
    private String type;

    /**
     * 申请人的电话号码
     */
    private String phone;

    // 当type 为 checkResults 或 checkResults 时, 是agree(同意) 还是 reject(拒绝)
    private String action;

    @Field("t")
    private Long timestamp;

    private String relationship;

    private Integer relationship_image_id;

    private String msgTitle;

    private String msgContent;

    /**
     * 失效日期
     */
    private Date expiryAt;

    /**
     * 消息生成的时间戳
     */
    private Long time;

}
